package lab02.Test11;

public class Pectangle implements Printx{
        //属性：边长（长、宽）
        double longth;
        double width;

        //行为：求面积，求周长
    double area(){
        return longth*width;
    }
    double perimeter(){
        return 2*(longth+width);
    }
    @Override
    public void printMyWay() {
        System.out.println(longth);
        System.out.println(width);
        System.out.println(area());
        System.out.println(perimeter());
    }
}
